package com.map.components.https;

import java.util.HashMap;
import java.util.Map;

public class RequestEntity {
    private String url;
    private final Map<String, String> allHeaders = new HashMap<String, String>();
    private final Map<String, String> params = new HashMap<String, String>();
    private String requestMethod;
    private String fileType;

    public RequestEntity() {
        allHeaders.put("Content-Type","application/x-www-form-urlencoded");
    }

    public RequestEntity(String url, String cookie) {
        this.url = url;
        allHeaders.put("Content-Type","application/x-www-form-urlencoded");
        setCookie(cookie);
    }

    public void setCookie(String cookie) {
        allHeaders.put("Cookie", cookie);
    }

    public void setHeader(String key, String value) {
        allHeaders.put(key, value);
    }

    public void setParam(String key, String value) {
        params.put(key, value);
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Map<String, String> getAllHeaders() {
        return allHeaders;
    }

//    public void setAllHeaders(Map<String, String> allHeaders) {
//        this.allHeaders = allHeaders;
//    }

    public Map<String, String> getAllParams() {
        return params;
    }

    public String getRequestMethod() {
        return requestMethod;
    }

    public void setRequestMethod(String requestMethod) {
        this.requestMethod = requestMethod;
    }

    public String getFileType() {
        return fileType;
    }

    public void setFileType(String fileType) {
        this.fileType = fileType;
    }

//    public void setAllParams(Map<String, Object> params) {
//        this.params = params;
//    }
}
